//
//  NYTopicContentView.m
//  百思不得姐
//
//  Created by Apple on 15/8/26.
//  Copyright (c) 2015年 Neal. All rights reserved.
//

#import "NYTopicContentView.h"
#import "NYShowPictureViewController.h"
#import "NYTopicModel.h"

@interface NYTopicContentView ()
@property (weak, nonatomic) IBOutlet UIImageView *pictureView;
@end
@implementation NYTopicContentView

- (void)awakeFromNib
{
    self.autoresizingMask = UIViewAutoresizingNone;
    self.pictureView.userInteractionEnabled = YES;
    
    [self.pictureView addGestureRecognizer:[[UITapGestureRecognizer alloc]  initWithTarget:self action:@selector(imageViewClick)]];
    
}
- (void)imageViewClick
{
    if (!self.pictureView.image) {
        return;
    }
    NYShowPictureViewController *sp = [[NYShowPictureViewController alloc]init];
    sp.topic = self.topic;
    //sp.image = self.pictureView.image;
    [self.window.rootViewController presentViewController:sp animated:YES completion:^{
    }];
}

@end
